<template>

    <el-dialog
        class="ba-operate-dialog"
        :close-on-click-modal="false"
        :model-value="props.data.id > 0"
        :before-close="close"
    >

        <template #header>
            <div class="title" v-drag="['.ba-operate-dialog', '.el-dialog__header']" v-zoom="'.ba-operate-dialog'">
                <span>{{ t('确认打款') }}</span>
            </div>
        </template>
        <el-scrollbar class="ba-table-form-scrollbar">
            <div
                class="ba-operate-form" style="width: calc(100% - 100px)"
            >
                <el-form
                    ref="formRef"
                    @submit.prevent=""
                    label-position="right"
                    label-width="100px"
                >
                
                    <FormItem :label="t('打款时间')" type="date" v-model="state.dk_time" :input-attr="{ disabled: false }" />
                </el-form>
            </div>
        </el-scrollbar>
        <template #footer>
            <div>
                <el-button @click="close">{{ t('取消') }}</el-button>
                <el-button v-blur type="primary" @click="dk">{{ t('保存') }}</el-button>
            </div>
        </template>

    </el-dialog>
    
</template>

<script setup lang="ts">
import { ref, provide, onMounted, reactive } from 'vue'
import baTableClass from '/@/utils/baTable'
import { defaultOptButtons } from '/@/components/table'
import { baTableApi } from '/@/api/common'
import { useI18n } from 'vue-i18n'
import Table from '/@/components/table/index.vue'
import TableHeader from '/@/components/table/header/index.vue'
import FormItem from '/@/components/formItem/index.vue'

import { cancelApi, dkApi } from '/@/api/most/finance/commission'

const emit = defineEmits(["closeP1", "load"])

defineOptions({
    name: 'daily/goods/viewAddress',
})

const { t } = useI18n()
const tableRef = ref()


interface Props {
    data: anyObj
}



const props = defineProps<Props>()

const state = reactive({
    dk_time: '',
    id: props.data.agent_id
})


// 关闭选择样品的弹窗
const close = (done: () => void) => {
    emit("closeP1")
    done();
}

const dk = () => {
    dkApi(state).then((e) => {
        emit("load")
    })
}



</script>

<style scoped lang="scss">
:deep(.el-image){
    width: 50px;
    height: unset;
}
:deep(.ba-data-table .btn){
    padding: 4px 14px;
}


:deep(.ba-data-table .margin-left-none:last-child){
    margin-bottom: 0px;
}
:deep(.table-operate-text){
    padding-left: 0;
}
:deep(.font-size-13){
    font-size: 13px;
}
</style>
